//
//  TopCollectionViewCell.m
//  HuiWenMovie
//
//  Created by ios on 15/7/21.
//  Copyright (c) 2015年 ios. All rights reserved.
//

#import "TopCollectionViewCell.h"
#import "UIImageView+WebCache.h"
@implementation TopCollectionViewCell

- (void)awakeFromNib {
    // Initialization code
    
    
}

- (void)setTopModel:(TopModel *)topModel
{
    _topModel = topModel;
    [self setNeedsLayout];
}

- (void)layoutSubviews
{
    [_topImageView sd_setImageWithURL:[NSURL URLWithString:_topModel.medium]];
    _title.text = _topModel.title;
    _rating.text = [NSString stringWithFormat:@"%0.1f",_topModel.average];
    _starView.average = _topModel.average;
}

@end
